﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="SearchFlight3.aspx.cs" Inherits="SearchFlight3" %>

<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="CSS/DisplayFlight.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table align="center" 
            style="width: 100%; height: 50px; border-color: #3399FF; background-color: #66CCFF;" 
            cellpadding="5">
            <tr align="center" valign="middle">
                <td width="80px">
                    <asp:HyperLink ID="HyperLink7" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight.aspx">1.Search</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink8" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight1.aspx">2.Confirm<br />Request</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink9" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight2.aspx">3.Choose<br />Route</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink10" runat="server" Font-Bold="True" ForeColor="#FF3300"
                        NavigateUrl="~/SearchFlight3.aspx">4.Choose<br />Flight</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink12" runat="server" Font-Bold="True" ForeColor="#666666">5.Choose<br />Seat Class</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink11" runat="server" Font-Bold="True" ForeColor="#666666">6.Passengers Detail</asp:HyperLink>
                </td>
                <td width="80px">
                    <asp:HyperLink ID="HyperLink13" runat="server" Font-Bold="True" ForeColor="#666666">7.Payment</asp:HyperLink>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <div align="left" style="padding-right: 20px; padding-left: 20px;">
        <h3 align="center" style="margin-bottom: 5px">
            Flight List</h3>
        <p align="center" style="margin-top: 1px">
            Choose your flight</p>
        <p align="center" style="margin: 5px; font-weight: bolder; font-size: medium;">
            ------------------ Depart Flight ------------------</p>
        <b>Depart Route :
            <asp:Label ID="lblRoute" runat="server"></asp:Label>
            <br />
            Choose your Depart Time </b>
        <asp:DropDownList ID="DropDownList1" runat="server">
        </asp:DropDownList>
        <br />
        <asp:Label ID="lblNoavial1" runat="server" ForeColor="Red" Text="No Flight Available. Maybe you can search in another day."
            Visible="False"></asp:Label>
        <br />
    </div>
    <div>
        <asp:DataList ID="DataList1" runat="server" Width="100%" CellPadding="4" ForeColor="#333333"
            OnItemCommand="DataList1_ItemCommand">
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
            <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SeparatorTemplate>
                <br />
            </SeparatorTemplate>
            <ItemTemplate>
                <table class="style1" border="1px">
                    <tr>
                        <td align="left" class="style2">
                            Origin :<br />
                            <asp:Label ID="OriginLabel" runat="server" Text='<%# Eval("Origin.FullName") %>' />
                        </td>
                        <td align="right">
                            DepartTime:
                            <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" class="style2">
                            Destination :<br />
                            <asp:Label ID="DestinationLabel" runat="server" Text='<%# Eval("Destination.FullName") %>' />
                        </td>
                        <td align="right" valign="bottom">
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("FlightList.Count") %>'></asp:Label>
                            &nbsp;flight(s)<br />
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select">View Detail</asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            <SelectedItemTemplate>
                <table class="style1" border="1px">
                    <tr>
                        <td align="left" class="style2">
                            Origin :<br />
                            <asp:Label ID="OriginLabel" runat="server" Text='<%# Eval("Origin.FullName") %>' />
                        </td>
                        <td align="right">
                            DepartTime:
                            <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" class="style2">
                            Destination :<br />
                            <asp:Label ID="DestinationLabel" runat="server" Text='<%# Eval("Destination.FullName") %>' />
                        </td>
                        <td align="right" valign="bottom">
                            <asp:LinkButton ID="LinkButton2" runat="server" CommandName="UnSelect">Close</asp:LinkButton>
                        </td>
                    </tr>
                </table>
                <asp:DataList ID="DataList2" runat="server" DataSource='<%# Eval("FlightList") %>'
                    HorizontalAlign="Right" Width="98%" CellPadding="4" ForeColor="#333333">
                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <AlternatingItemStyle BackColor="White" />
                    <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
                    <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    <SeparatorTemplate>
                        <br />
                    </SeparatorTemplate>
                    <HeaderTemplate>
                        <table border="1" width="100%">
                            <tr>
                                <td align="center" class="style5">
                                    Flight ID
                                </td>
                                <td align="center" class="style3">
                                    From
                                </td>
                                <td align="center" class="style3">
                                    To
                                </td>
                                <td align="center" class="style3">
                                    Air Plane
                                </td>
                                <td align="center" class="style6">
                                    Depart Time
                                </td>
                                <td align="center" class="style4">
                                    Fly hour
                                </td>
                                <td align="center" class="style3">
                                    Allow smoking
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                    <ItemTemplate>
                        <table width="100%" border="1">
                            <tr>
                                <td align="center" class="style5">
                                    <asp:Label ID="FID" runat="server" Text='<%# Eval("FlightID") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:Label ID="lblFlightOrigin" runat="server" Text='<%# Eval("Route.Origin.Name") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:Label ID="lblFlightDes" runat="server" Text='<%# Eval("Route.Destination.Name") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:Label ID="AirPlane" runat="server" Text='<%# Eval("Plane.Name") %>' />
                                </td>
                                <td align="center" class="style6">
                                    <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                                    <br />
                                    <asp:Label ID="GMT" runat="server" Text='<%# Eval("Route.Origin.GMT", "(GMT {0})") %>' />
                                </td>
                                <td align="center" class="style4">
                                    <asp:Label ID="FlyHour" runat="server" Text='<%# Eval("FlyHour") %>' />
                                </td>
                                <td align="center" class="style3">
                                    <asp:RadioButton ID="RadioButton1" runat="server" Checked='<%# Eval("Smoking") %>'
                                        Text="Allow Smoking" Enabled="False" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    Available Bussiness Class Seat:
                                    <asp:Label ID="AvailBussSeatLabel0" runat="server" Text='<%# Eval("AvailBussSeat") %>' />
                                    <td colspan="2">
                                        Price per Seat:
                                        <asp:Label ID="BussPriceLabel0" runat="server" Text='<%# Eval("BussPrice","{0}USD") %>' />
                                    </td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    Available First Class Seat:
                                    <asp:Label ID="AvailFirstSeatLabel" runat="server" Text='<%# Eval("AvailFirstSeat") %>' />
                                    <td colspan="2">
                                        Price per Seat:
                                        <asp:Label ID="FirstPriceLabel" runat="server" Text='<%# Eval("FirstPrice","{0}USD") %>' />
                                    </td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    Available Club Class Seat:
                                    <asp:Label ID="AvailClubSeatLabel" runat="server" Text='<%# Eval("AvailClubSeat") %>' />
                                    <td colspan="2">
                                        Price per Seat:
                                        <asp:Label ID="ClubPriceLabel" runat="server" Text='<%# Eval("ClubPrice", "{0}USD") %>' />
                                    </td>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    Children Discount:
                                    <asp:Label ID="ChildDiscountLabel" runat="server" Text='<%# Eval("ChildDiscount","{0}%") %>' />
                                    <td colspan="3">
                                        Senior Discount:
                                        <asp:Label ID="SeniorDiscountLabel" runat="server" Text='<%# Eval("SeniorDiscount","{0}%") %>' />
                                    </td>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </SelectedItemTemplate>
        </asp:DataList>
    </div>
    <br />
    <asp:PlaceHolder ID="PlaceHolder1" runat="server" Visible="False">
        <p align="center" style="margin: 5px; font-weight: bolder; font-size: medium;">
            ------------------ Return Flight ------------------</p>
        <div style="text-align: left; padding-left: 20px;">
            <b>Return Route :
                <asp:Label ID="lblReturnRoute" runat="server"></asp:Label></b><br />
            <b>Choose your Return Time </b>
            <asp:DropDownList ID="DropDownList2" runat="server">
            </asp:DropDownList>
            <br />
            <asp:Label ID="lblNoavial2" runat="server" ForeColor="Red" Text="No Flight Available. Maybe you can search in another day."
                Visible="False"></asp:Label>
        </div>
        <br />
        <div>
            <asp:DataList ID="DataList3" runat="server" Width="100%" CellPadding="4" ForeColor="#333333"
                OnItemCommand="DataList3_ItemCommand">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SeparatorTemplate>
                    <br />
                </SeparatorTemplate>
                <ItemTemplate>
                    <table class="style1" border="1px">
                        <tr>
                            <td align="left" class="style2">
                                Origin :<br />
                                <asp:Label ID="OriginLabel" runat="server" Text='<%# Eval("Origin.FullName") %>' />
                            </td>
                            <td align="right">
                                DepartTime:
                                <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td align="left" class="style2">
                                Destination :<br />
                                <asp:Label ID="DestinationLabel" runat="server" Text='<%# Eval("Destination.FullName") %>' />
                            </td>
                            <td align="right" valign="bottom">
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("FlightList.Count") %>'></asp:Label>
                                &nbsp;flight(s)<br />
                                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select">View Detail</asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <SelectedItemTemplate>
                    <table class="style1" border="1px">
                        <tr>
                            <td align="left" class="style2">
                                Origin :<br />
                                <asp:Label ID="OriginLabel" runat="server" Text='<%# Eval("Origin.FullName") %>' />
                            </td>
                            <td align="right">
                                DepartTime:
                                <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td align="left" class="style2">
                                Destination :<br />
                                <asp:Label ID="DestinationLabel" runat="server" Text='<%# Eval("Destination.FullName") %>' />
                            </td>
                            <td align="right" valign="bottom">
                                <asp:LinkButton ID="LinkButton2" runat="server" CommandName="UnSelect">Close</asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                    <asp:DataList ID="DataList4" runat="server" DataSource='<%# Eval("FlightList") %>'
                        HorizontalAlign="Right" Width="98%" CellPadding="4" ForeColor="#333333">
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <AlternatingItemStyle BackColor="White" />
                        <ItemStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedItemStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <SeparatorTemplate>
                            <br />
                        </SeparatorTemplate>
                        <HeaderTemplate>
                            <table border="1" width="100%">
                                <tr>
                                    <td align="center" class="style5">
                                        Flight ID
                                    </td>
                                    <td align="center" class="style3">
                                        From
                                    </td>
                                    <td align="center" class="style3">
                                        To
                                    </td>
                                    <td align="center" class="style3">
                                        Air Plane
                                    </td>
                                    <td align="center" class="style6">
                                        Depart Time
                                    </td>
                                    <td align="center" class="style4">
                                        Fly hour
                                    </td>
                                    <td align="center" class="style3">
                                        Allow smoking
                                    </td>
                                </tr>
                            </table>
                        </HeaderTemplate>
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <ItemTemplate>
                            <table width="100%" border="1">
                                <tr>
                                    <td align="center" class="style5">
                                        <asp:Label ID="FID" runat="server" Text='<%# Eval("FlightID") %>' />
                                    </td>
                                    <td align="center" class="style3">
                                        <asp:Label ID="lblFlightOrigin" runat="server" Text='<%# Eval("Route.Origin.Name") %>' />
                                    </td>
                                    <td align="center" class="style3">
                                        <asp:Label ID="lblFlightDes" runat="server" Text='<%# Eval("Route.Destination.Name") %>' />
                                    </td>
                                    <td align="center" class="style3">
                                        <asp:Label ID="AirPlane" runat="server" Text='<%# Eval("Plane.Name") %>' />
                                    </td>
                                    <td align="center" class="style6">
                                        <asp:Label ID="DepartTimeLabel" runat="server" Text='<%# Eval("DepartTime") %>' />
                                        <br />
                                        <asp:Label ID="GMT" runat="server" Text='<%# Eval("Route.Origin.GMT", "(GMT {0})") %>' />
                                    </td>
                                    <td align="center" class="style4">
                                        <asp:Label ID="FlyHour" runat="server" Text='<%# Eval("FlyHour") %>' />
                                    </td>
                                    <td align="center" class="style3">
                                        <asp:RadioButton ID="RadioButton1" runat="server" Checked='<%# Eval("Smoking") %>'
                                            Text="Allow Smoking" Enabled="False" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="5">
                                        Available Bussiness Class Seat:
                                        <asp:Label ID="AvailBussSeatLabel0" runat="server" Text='<%# Eval("AvailBussSeat") %>' />
                                        <td colspan="2">
                                            Price per Seat:
                                            <asp:Label ID="BussPriceLabel0" runat="server" Text='<%# Eval("BussPrice","{0}USD") %>' />
                                        </td>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="5">
                                        Available First Class Seat:
                                        <asp:Label ID="AvailFirstSeatLabel" runat="server" Text='<%# Eval("AvailFirstSeat") %>' />
                                        <td colspan="2">
                                            Price per Seat:
                                            <asp:Label ID="FirstPriceLabel" runat="server" Text='<%# Eval("FirstPrice","{0}USD") %>' />
                                        </td>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="5">
                                        Available Club Class Seat:
                                        <asp:Label ID="AvailClubSeatLabel" runat="server" Text='<%# Eval("AvailClubSeat") %>' />
                                        <td colspan="2">
                                            Price per Seat:
                                            <asp:Label ID="ClubPriceLabel" runat="server" Text='<%# Eval("ClubPrice", "{0}USD") %>' />
                                        </td>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        Children Discount:
                                        <asp:Label ID="ChildDiscountLabel" runat="server" Text='<%# Eval("ChildDiscount","{0}%") %>' />
                                        <td colspan="3">
                                            Senior Discount:
                                            <asp:Label ID="SeniorDiscountLabel" runat="server" Text='<%# Eval("SeniorDiscount","{0}%") %>' />
                                        </td>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:DataList>
                </SelectedItemTemplate>
            </asp:DataList>
        </div>
    </asp:PlaceHolder>
    <div align="center" style="margin: 15px; width: 100%">
        <asp:Button ID="Button1" runat="server" Text="Continue" OnClick="Button1_Click" />
    </div>
</asp:Content>
